Skip to content

feat: Implement persistent, focused root directory for sidebar with '..' navigation#136

Open
msavox wants to merge 3 commits into
netdcy:mainfrom
msavox:main
Open

feat: Implement persistent, focused root directory for sidebar with '..' navigation#136
msavox wants to merge 3 commits into
netdcy:mainfrom
msavox:main

Conversation

@msavox
Copy link
Copy Markdown

@msavox msavox commented Jan 16, 2026

This Pull Request introduces a new feature to enhance sidebar management, providing more granular control over directory viewing and improving user navigation.

Key Changes:

  • Custom Root Directory: Double-clicking a folder in the sidebar now sets it as the new "root" of the tree view. The sidebar will then display only the contents of that folder and its subfolders, hiding the rest of the higher hierarchy.
  • Upward Navigation (..): If the current root directory is not the filesystem's root, a special ".." entry is added at the beginning of the list of children for the current root folder. Double-clicking ".." will navigate up one level in the directory hierarchy.
  • Persistence on Launch: The selected root directory is saved in the application's preferences. Upon subsequent launches, the application will automatically start from this directory, maintaining the user's preferred sidebar configuration.

Motivation:

These changes significantly improve usability for users working with deep repositories or folder structures, allowing them to focus the directory tree on a relevant part of the filesystem and easily restore that context on each launch.

@netdcy
Copy link
Copy Markdown
Owner

netdcy commented Jan 27, 2026

Thank you very much for your work! Root directory switching through double-clicking is a great idea!

In terms of specific implementation, there might still be some details that need to be determined, such as: 1. After setting a certain directory A as the root by double-clicking, there's no way to click the directory tree to switch exactly under this directory, you can only jump to its subdirectory or parent directory. 2. Due to historical reasons, the related code is quite chaotic, which caused a bug after your modifications; I still need to check this carefully.

Additionally, please do not git commit unrelated files such as project.pbxproj and Main.storyboard.

@msavox
Copy link
Copy Markdown
Author

msavox commented Jan 27, 2026 via email

@msavox
Copy link
Copy Markdown
Author

msavox commented Feb 11, 2026

Hi netdcy,

Just wanted to update you on the latest changes in this Pull Request.

Following your feedback:

  • I've updated the .gitignore file to properly exclude Xcode project files (project.pbxproj) and Storyboard files (*.storyboard), preventing them from being committed in the future.
  • The issues/bugs you mentioned in your previous review (related to the chaotic code after my modifications) have also been resolved.

The branch has been updated with these changes, and I believe it's now ready for another review.

Thank you for your time and guidance!

@netdcy
Copy link
Copy Markdown
Owner

netdcy commented Feb 28, 2026

Thank you again for your efforts! However, there are still quite a few issues with the code implementation, and relying solely on LLM isn’t sufficient. The main reason is that my implementation of the directory tree is very messy; I suspect no one but me would be able to make changes to it. Additionally, this commit includes files such as .gitignore, project.pbxproj, Main.storyboard, and pull_request_description.txt, which suggests that you may not be fully familiar with git yet. Therefore, I’m afraid to say that this pull request is still a long way from being ready for merging.

But overall, it’s a great idea. If you don’t mind, I plan to rewrite this feature myself in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants